
const arr = [1,2,3,4,5]
const pp = (v) => {
    console.log('请求pppp', v)
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            resolve('结果：pp' + v)
        }, 600)
    })
}
const tt = () => {
    console.log('请求tt===')
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            resolve('结果：tt')
        }, 500)
    })
}
const ppFn = async () => {
    // 重点！！！ 用for循环处理多个接口同步调用
    for(let i = 0; i < arr.length; i++) {
        const res = await pp(arr[i])
        console.log(res)
    }
}
export const handleReq = async () => {
    await ppFn()
    console.log('pp方法请求结束')
    const resTT = await tt()
    console.log(resTT)
}